﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;

namespace WindowsFormsApplication1
{
    public partial class balance : Form
    {
        public balance()
        {
            InitializeComponent();
            string connString = "Data Source=|DataDirectory|\\Model\\Database1.sdf";
            string query = "SELECT name,bala AS Balance FROM balance WHERE apartID=" + Globals.dept;

            BindingSource bS = new BindingSource();
            bS.DataSource = Controller.Control.Select(query, connString);
            dgv01.DataSource = bS; 
        }

        private void btn_back_Click(object sender, EventArgs e)
        {
            Form homep = new home();
            homep.Owner = this;
            homep.Show();
            this.Hide();
        }
    }
}
